/*
 * @Descripttion: 
 * @version: 
 * @Author: zero
 * @Date: 2020-04-28 22:19:45
 * @LastEditors: zero
 * @LastEditTime: 2020-04-29 09:26:44
 */
import useAuth from "@/hooks/useAuth"
import { Redirect } from "react-router-dom";
export default (props) => {
  const { isLogin } = useAuth();
  if (isLogin) {
    return <div>{props.children}</div>;
  } else {
    return false
    // return <Redirect to='/index' />
    
  }
}